package javanet.exception;

/**
 * @author Markus Holzer
 */
public class JavaNETException extends Exception implements
		JavaNETErrorInformation {

	private static final long serialVersionUID = -2096293695277404783L;

	private String errorCode;

	private String errorMessage;

	public JavaNETException() {
		super();
	}

	public JavaNETException(String errorCode, String errorMessage) {
		super();
		this.errorCode = errorCode;
		this.errorMessage = errorMessage;
	}

	public JavaNETException(String errorMessage, Throwable cause) {
		super(errorMessage, cause);
		this.errorMessage = errorMessage;
	}

	public JavaNETException(String errorCode, String errorMessage,
			Throwable cause) {
		super(errorMessage, cause);
		this.errorCode = errorCode;
		this.errorMessage = errorMessage;
	}

	public JavaNETException(String errorMessage) {
		super(errorMessage);
		this.errorMessage = errorMessage;
	}

	public JavaNETException(Throwable cause) {
		super(cause);
	}

	public void setErrorCode(String errorCode) {
		this.errorCode = errorCode;
	}

	public void setErrorMessage(String errorMessage) {
		this.errorMessage = errorMessage;
	}

	@Override
	public String getErrorCode() {
		return errorCode;
	}

	@Override
	public String getErrorMessage() {
		return errorMessage;
	}

}
